# eric7.Debugger.BreakPointModel

Module implementing the Breakpoint model.

### Global Attributes

None

### Classes

BreakPointModel | Class implementing a custom model for breakpoints.

### Functions

None

## BreakPointModel

Class implementing a custom model for breakpoints.

### Signals

dataAboutToBeChanged(QModelIndex, QModelIndex)
  emitted to indicate a change of the data

### Derived from

QAbstractItemModel

### Class Attributes

Alignments
ConditionColumn
EnabledColumn
FilenameColumn
Header
IgnoreCountColumn
LineNumberColumn
TemporaryColumn

### Class Methods

None

### Methods

BreakPointModel | Constructor
addBreakPoint | Public method to add a new breakpoint to the list.
addBreakPoints | Public method to add multiple breakpoints to the list.
columnCount | Public method to get the current column count.
data | Public method to get the requested data.
deleteAll | Public method to delete all breakpoints.
deleteBreakPointByIndex | Public method to set the values of a breakpoint given by index.
deleteBreakPoints | Public method to delete a list of breakpoints given by their indexes.
flags | Public method to get item flags.
getAllBreakpoints | Public method to get a copy of the breakpoints.
getBreakPointByIndex | Public method to get the values of a breakpoint given by index.
getBreakPointIndex | Public method to get the index of a breakpoint given by filename and line number.
hasChildren | Public method to check for the presence of child items.
headerData | Public method to get header data.
index | Public method to create an index.
isBreakPointTemporaryByIndex | Public method to test, if a breakpoint given by its index is temporary.
parent | Public method to get the parent index.
rowCount | Public method to get the current row count.
setBreakPointByIndex | Public method to set the values of a breakpoint given by index.
setBreakPointEnabledByIndex | Public method to set the enabled state of a breakpoint given by index.
setData | Public method to change data in the model.

### Static Methods

None

#### BreakPointModel (Constructor)

BreakPointModel(project, parent=None)

Constructor

project (Project)
  reference to the project object
parent (QObject)
  reference to the parent widget

#### BreakPointModel.addBreakPoint

addBreakPoint(fn, line, properties)

Public method to add a new breakpoint to the list.

fn (str)
  filename of the breakpoint
line (int)
  line number of the breakpoint
properties (tuple of (str, bool, bool, int))
  properties of the breakpoint (tuple of condition, temporary flag, enabled flag, ignore count)

#### BreakPointModel.addBreakPoints

addBreakPoints(breakpoints)

Public method to add multiple breakpoints to the list.

breakpoints (list of (str, int, str, bool, bool, int))
  list of breakpoints with file name, line number, condition, temporary flag, enabled flag and ignore count each

#### BreakPointModel.columnCount

columnCount(parent=None)

Public method to get the current column count.

parent (QModelIndex)
  reference to parent index (unused)

Return:
  column count

Return Type:
  int

#### BreakPointModel.data

data(index, role=Qt.ItemDataRole.DisplayRole)

Public method to get the requested data.

index (QModelIndex)
  index of the requested data
role (Qt.ItemDataRole)
  role of the requested data

Return:
  the requested data

Return Type:
  Any

#### BreakPointModel.deleteAll

deleteAll()

Public method to delete all breakpoints.

#### BreakPointModel.deleteBreakPointByIndex

deleteBreakPointByIndex(index)

Public method to set the values of a breakpoint given by index.

index (QModelIndex)
  index of the breakpoint

#### BreakPointModel.deleteBreakPoints

deleteBreakPoints(idxList)

Public method to delete a list of breakpoints given by their indexes.

idxList (list of QModelIndex)
  list of breakpoint indexes

#### BreakPointModel.flags

flags(index)

Public method to get item flags.

index (QModelIndex)
  index of the requested flags

Return:
  item flags for the given index

Return Type:
  Qt.ItemFlags

#### BreakPointModel.getAllBreakpoints

getAllBreakpoints()

Public method to get a copy of the breakpoints.

Return:
  list of breakpoints

Return Type:
  list of list of [str, int, str, bool, bool, int]

#### BreakPointModel.getBreakPointByIndex

getBreakPointByIndex(index)

Public method to get the values of a breakpoint given by index.

index (QModelIndex)
  index of the breakpoint

Return:
  breakpoint (list of six values (filename, line number, condition, temporary flag, enabled flag, ignore count))

Return Type:
  list of (str, int, str, bool, bool, int)

#### BreakPointModel.getBreakPointIndex

getBreakPointIndex(fn, lineno)

Public method to get the index of a breakpoint given by filename and line number.

fn (str)
  filename of the breakpoint
lineno (int)
  line number of the breakpoint

Return:
  index

Return Type:
  QModelIndex

#### BreakPointModel.hasChildren

hasChildren(parent=None)

Public method to check for the presence of child items.

parent (QModelIndex)
  index of parent item

Return:
  flag indicating the presence of child items

Return Type:
  bool

#### BreakPointModel.headerData

headerData(section, orientation, role=Qt.ItemDataRole.DisplayRole)

Public method to get header data.

section (int)
  section number of the requested header data
orientation (Qt.Orientation)
  orientation of the header
role (Qt.ItemDataRole)
  role of the requested data

Return:
  header data

Return Type:
  str

#### BreakPointModel.index

index(row, column, parent=None)

Public method to create an index.

row (int)
  row number for the index
column (int)
  column number for the index
parent (QModelIndex)
  index of the parent item

Return:
  requested index

Return Type:
  QModelIndex

#### BreakPointModel.isBreakPointTemporaryByIndex

isBreakPointTemporaryByIndex(index)

Public method to test, if a breakpoint given by its index is temporary.

index (QModelIndex)
  index of the breakpoint to test

Return:
  flag indicating a temporary breakpoint

Return Type:
  bool

#### BreakPointModel.parent

parent(_index)

Public method to get the parent index.

_index (QModelIndex)
  index of item to get parent (unused)

Return:
  index of parent

Return Type:
  QModelIndex

#### BreakPointModel.rowCount

rowCount(parent=None)

Public method to get the current row count.

parent (QModelIndex)
  reference to parent index

Return:
  row count

Return Type:
  int

#### BreakPointModel.setBreakPointByIndex

setBreakPointByIndex(index, fn, line, properties)

Public method to set the values of a breakpoint given by index.

index (QModelIndex)
  index of the breakpoint
fn (str)
  filename of the breakpoint
line (int)
  line number of the breakpoint
properties (tuple of (str, bool, bool, int))
  properties of the breakpoint (tuple of condition, temporary flag, enabled flag, ignore count)

#### BreakPointModel.setBreakPointEnabledByIndex

setBreakPointEnabledByIndex(index, enabled)

Public method to set the enabled state of a breakpoint given by index.

index (QModelIndex)
  index of the breakpoint
enabled (bool)
  flag giving the enabled state

#### BreakPointModel.setData

setData(index, value, role=Qt.ItemDataRole.EditRole)

Public method to change data in the model.

index (QModelIndex)
  index of the changed data
value (any)
  value of the changed data
role (Qt.ItemDataRole)
  role of the changed data (unused)

Return:
  flag indicating success

Return Type:
  bool

Up